/*	
	관련파일 : obj_2.html
*/	
function Score(n, k, m, e)
{
	this.name = n;
	this.kor = k;
	this.mat = m;
	this.eng = e;
	this.tot = 0;
	this.avg = 0;
	
	this.compute = function()
	{
		this.tot = this.kor + this.mat + this.eng;
		this.avg = this.tot / 3;
	};
	this.prn = function()
	{
		
	};
}
function Init()
{
	var obj = new Array();
	var sendBtn = document.getElementById('send');
	var prnBtn = document.getElementById('prn');
	
	sendBtn.onclick = function()
	{
		var so = new Score(grade.irum.value, grade.kor.value, grade.mat.value, grade.eng.value);
		so.compute();
		obj.push(so);
	};
	prnBtn.onclick = function()
	{
		var r = document.getElementById('result');
		var str = '';
		for(i=0; i<obj.length; i++)
			str += obj[i].prn();
		r.innerHTML = str;
	};
}